$(function() {
    $("#form").validate({
        rules: {
            name: {
                required: true,
                minlength: 3
            },password: {
                required: true,
                minlength: 3
            }
        }, messages: {
            name: {
                required: "<i style='color: red;position: absolute; top: 10px;right: 0;' class='fa fa-exclamation-triangle'></i>",
                minlength: "<i style='color: red;position: absolute; top: 10px;right: 0;' class='fa fa-exclamation-triangle'></i>"
            }, password: {
                required: "<i style='color: red;position: absolute; top: 10px;right: 0;' class='fa fa-exclamation-triangle'></i>",
                minlength: "<i style='color: red;position: absolute; top: 10px;right: 0;' class='fa fa-exclamation-triangle'></i>"
            }
        }
    })
});